const http = require('http');
const route = require('./route.js')
http.createServer((req,res)=>{
    let url = new URL(req.url,'http://127.0.0.1');
    try{
        route[url.pathname](res);
    }catch(e){
        route['/404'](res);
    }
    res.end();
}).listen(9999,()=>{console.log('server start');})